.main {
  min-width: 400px;
  & > * + * {
    margin-top: 1rem;
  }
}

body {
  padding: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

[data-presence] {
  background-color: red;
  padding: 24px;
  transform-origin: left top;
}

[data-presence][data-state="open"] {
  animation: fadeIn 0.15s ease-out;
}

[data-presence][data-state="closed"] {
  animation: fadeOut 0.1s ease-in;
}

@keyframes fadeIn {
  from {
    scale: 0.9;
    opacity: 0;
  }

  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    scale: 0.9;
  }
}
